home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / AOCE folder / OCEStandardDirectory.lisp < prev    next >
Encoding:
Text File  |  1994-09-12  |  26.6 KB  |  691 lines  |  [TEXT/CCL2]

  1.  
  2. (in-package :TRAPS)             ; ***********************************************************
  3. ; Created: Monday, November 8, 1993 11:59AM
  4. ;  OCEStandardDirectory.p
  5. ;  Pascal Interface to the Macintosh Libraries
  6. ;   Copyright Apple Computer, Inc. 1990-1993
  7. ;   All rights reserved
  8. ; ***********************************************************
  9.  
  10. ; $IFC UNDEFINED UsingIncludes
  11. ; $SETC UsingIncludes:= 0
  12. ; $ENDC
  13.  
  14. ; $IFC NOT UsingIncludes
  15.  
  16. ; $ENDC
  17.  
  18. ; $IFC UNDEFINED UsingOCEStandardDirectory
  19. ; $SETC UsingOCEStandardDirectory:= 1
  20.  
  21. ; $I+
  22. ; $SETC OCEStandardDirectoryIncludes:= UsingIncludes
  23. ; $SETC UsingIncludes:= 1
  24.  
  25. ; $IFC UNDEFINED UsingOCE
  26. ; $I OCE.p
  27. ; $ENDC
  28.  
  29. ; $IFC UNDEFINED UsingOCEAuthDir
  30. ; $I OCEAuthDir.p
  31. ; $ENDC
  32.  
  33. ; $IFC UNDEFINED UsingTypes
  34.  
  35. (require-interface 'TYPES)      ; $I $$Shell(PInterfaces)Types.p
  36. ; $ENDC
  37.  
  38. ; $IFC UNDEFINED UsingWindows
  39.  
  40. (require-interface 'WINDOWS)    ; $I $$Shell(PInterfaces)Windows.p
  41. ; $ENDC
  42.  
  43. ; $IFC UNDEFINED UsingIcons
  44.  
  45. (require-interface 'ICONS)      ; $I $$Shell(PInterfaces)Icons.p
  46. ; $ENDC
  47.  
  48. ; $SETC UsingIncludes:= OCEStandardDirectoryIncludes
  49.  
  50. ;  CollabPack Trap Selectors 
  51.  
  52. (defconstant $kSDPNewPanel 100)
  53. (defconstant $kSDPGetNewPanel 101)
  54. (defconstant $kSDPDisposePanel 102)
  55. (defconstant $kSDPHidePanel 103)
  56. (defconstant $kSDPShowPanel 104)
  57. (defconstant $kSDPEnablePanel 105)
  58. (defconstant $kSDPUpdatePanel 106)
  59. (defconstant $kSDPMovePanel 107)
  60. (defconstant $kSDPSizePanel 108)
  61. (defconstant $kSDPOpenSelectedItem 109)
  62. (defconstant $kSDPGetPanelSelectionState 110)
  63. (defconstant $kSDPGetPanelSelection 111)
  64. (defconstant $kSDPSetPath 112)
  65. (defconstant $kSDPPanelEvent 113)
  66. (defconstant $kSDPGetPanelSelectionSize 114)
  67. (defconstant $kSDPSetIdentity 115)
  68. (defconstant $kSDPSelectString 116)
  69. (defconstant $kSDPGetPathLength 117)
  70. (defconstant $kSDPGetPath 118)
  71. (defconstant $kSDPSetFocus 119)
  72. (defconstant $kSDPSetPanelBalloonHelp 120)
  73. (defconstant $kSDPInstallPanelBusyProc 121)
  74.  
  75. (defconstant $kSDPPromptForID 904)
  76.  
  77. (defconstant $kSDPNewFindPanel 2300)
  78. (defconstant $kSDPDisposeFindPanel 2301)
  79. (defconstant $kSDPStartFind 2302)
  80. (defconstant $kSDPStopFind 2303)
  81. (defconstant $kSDPFindPanelEvent 2304)
  82. (defconstant $kSDPDrawFindPanel 2305)
  83. (defconstant $kSDPShowFindPanel 2306)
  84. (defconstant $kSDPHideFindPanel 2307)
  85. (defconstant $kSDPMoveFindPanel 2308)
  86. (defconstant $kSDPEnableFindPanel 2309)
  87. (defconstant $kSDPSetFindPanelFocus 2310)
  88. (defconstant $kSDPGetFindPanelState 2311)
  89. (defconstant $kSDPGetFindPanelSelectionSize 2312)
  90. (defconstant $kSDPGetFindPanelSelection 2313)
  91. (defconstant $kSDPSetFindPanelBalloonHelp 2314)
  92. (defconstant $kSDPSetFindIdentity 2315)
  93. (defconstant $kSDPInstallFindPanelBusyProc 2316)
  94.  
  95. (defconstant $kSDPGetIconByType 1024)
  96. (defconstant $kSDPGetDSSpecIcon 1025)
  97. (defconstant $kSDPGetCategories 1026)
  98. (defconstant $kSDPGetCategoryTypes 1027)
  99.  
  100. (defconstant $kSDPResolveAliasFile 3700)
  101. (defconstant $kSDPResolveAliasDSSpec 3701)
  102.  
  103. (defconstant $kSDPRepairPersonalDirectory 6700)
  104.  
  105. ;  Collaboration Package Gestalts. 
  106.  
  107. (defconstant $gestaltSDPStandardDirectoryVersion :|sdvr|)
  108. (defconstant $gestaltSDPFindVersion :|dfnd|)
  109. (defconstant $gestaltSDPPromptVersion :|prpv|)
  110.  
  111. ; $IFC UNDEFINED svLarge1Bit
  112. ;   Selector mask values  
  113. ;  This is temporary. It will eventually appear in Icons.h 
  114.  
  115. (def-mactype :ICONSELECTORVALUE (find-mactype :SIGNED-LONG))
  116.  
  117. (defconstant $svLarge1Bit #X1)
  118. (defconstant $svLarge4Bit #X2)
  119. (defconstant $svLarge8Bit #X4)
  120. (defconstant $svSmall1Bit #X100)
  121. (defconstant $svSmall4Bit #X200)
  122. (defconstant $svSmall8Bit #X400)
  123. (defconstant $svMini1Bit #X10000)
  124. (defconstant $svMini4Bit #X20000)
  125. (defconstant $svMini8Bit #X40000)
  126. (defconstant $svAllLargeData #XFF)
  127. (defconstant $svAllSmallData #XFF00)
  128. (defconstant $svAllMiniData #XFF0000)
  129. (defconstant $svAll1BitData (+ #$SVLARGE1BIT (+ #$SVSMALL1BIT #$SVMINI1BIT)))
  130. (defconstant $svAll4BitData (+ #$SVLARGE4BIT (+ #$SVSMALL4BIT #$SVMINI4BIT)))
  131. (defconstant $svAll8BitData (+ #$SVLARGE8BIT (+ #$SVSMALL8BIT #$SVMINI8BIT)))
  132. (defconstant $svAllAvailableData #XFFFFFFFF)
  133. ; $ENDC
  134.  
  135. ;  generic icon suites 
  136.  
  137. (defconstant $genericDirectoryIconResource -16721);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  138. (defconstant $genericLockedDirectoryIconResource -16716);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  139. (defconstant $genericRecordIconResource -16722);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  140. (defconstant $genericAttributeIconResource -16723);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  141. (defconstant $genericTemplateIconResource -16746);  icl8, icl4, ICN#, ics#, ics4, ics8 
  142.  
  143. ;  standard icon suites 
  144.  
  145. (defconstant $directoryFolderIconResource -16720);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  146. (defconstant $lockedDirectoryFolderIconResource -16719);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  147. (defconstant $personalDirectoryIconResource -16718);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  148. (defconstant $directoriesIconResource -16717);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  149. (defconstant $preferredPersonalDirectoryIconResource -16724);  icl8, icl4, ICN#, ics#, ics4, ics8, sicn  
  150.  
  151. ;  icon IDs for spinning arrows 
  152. (defconstant $kFirstSpinnerIcon -16745)
  153. (defconstant $kLastSpinnerIcon -16738)
  154.  
  155. ;  resource types 
  156. (defconstant $kSDPPanelResourceType :|panl|)
  157. (defconstant $kSDPFindPanelResourceType :|find|)
  158.  
  159. ;  Standard FindPanel resource 
  160. (defconstant $kStandardFindLayout -16700)
  161.  
  162. ;  Values of SDPMatchWith 
  163. (defconstant $kSDPMatchAll 0)
  164. (defconstant $kSDPExactMatch 256)
  165. (defconstant $kSDPBeginsWith 512)
  166. (defconstant $kSDPEndingWith 1024)
  167. (defconstant $kSDPContaining 2048)
  168.  
  169. (def-mactype :SDPMATCHWITH (find-mactype :SIGNED-INTEGER))
  170.  
  171. ;  Prompt For Identity structures 
  172.  
  173. (defconstant $kSDPGuestBit 0)
  174. (defconstant $kSDPSpecificIdentityBit 1)
  175. (defconstant $kSDPLocalIdentityBit 2)
  176.  
  177. ;  Values of SDPIdentityKind 
  178. (defconstant $kSDPGuestMask #X1); 1<<kSDPGuestBit
  179. (defconstant $kSDPSpecificIdentityMask #X2); 1<<kSDPSpecificIdentityBit
  180. (defconstant $kSDPLocalIdentityMask #X4); 1<<kSDPLocalIdentityBit
  181.  
  182. (def-mactype :SDPIDENTITYKIND (find-mactype :SIGNED-INTEGER))
  183.  
  184. (defconstant $kSDPSuggestionOnly 0)
  185. (defconstant $kSDPRestrictToDirectory 1)
  186. (defconstant $kSDPRestrictToRecord 2)
  187.  
  188. (def-mactype :SDPLOGINFILTERKIND (find-mactype :SIGNED-INTEGER))
  189.  
  190. ;  Panel Structures 
  191.  
  192. ; While the panel is in operation, four selection states may exist.
  193. ;     1) kSDPNothingSelected means nothing is selected.
  194. ;     2) kContainSelected means a volume, folder, directory, dnode, or PAB is selected.
  195. ;     3) kSDPLockedContainerSelected means one of the above, but no access privledges.
  196. ;     4) kSDPRecordSelected means that a record is currently selected.
  197.  
  198. ;  Values of SDPSelectionState 
  199. (defconstant $kSDPNothingSelected 0)
  200. (defconstant $kSDPLockedContainerSelected 1)
  201. (defconstant $kSDPContainerSelected 2)
  202. (defconstant $kSDPRecordSelected 3)
  203. (defconstant $kSDPRecordAliasSelected 4)
  204. (defconstant $kSDPContainerAliasSelected 5)
  205.  
  206. (def-mactype :SDPSELECTIONSTATE (find-mactype :SIGNED-INTEGER))
  207.  
  208. ; This type informs the caller of the action the user took, either as the result
  209. ; of an event (as returned by SDPPanelEvent) or when SDPOpenSelectedItem is called.
  210. ; kSDPProcessed means that the event (or call to SDPOpenSelectedItem) resulted in no
  211. ; state change.
  212. ; kSDPSelectedAnItem indicates that the user wants to select the currently-hilited
  213. ; record. This is returned, for example, when a user double-clicks on a record.
  214. ; kSDPChangedSelection implies that the user clicked on a new item (which may mean
  215. ; that no item is selected).
  216.  
  217. ;  Values of SDPPanelState 
  218. (defconstant $kSDPProcessed 0)
  219. (defconstant $kSDPSelectedAnItem 1)
  220. (defconstant $kSDPChangedSelection 2)
  221.  
  222. (def-mactype :SDPPANELSTATE (find-mactype :SIGNED-INTEGER))
  223.  
  224. ; Your application may read any of the fields in a SDPPanelRecord, but it should
  225. ; use the appropriate routines to make changes to the records with the exception
  226. ; of the refCon field which your application may read or write at will.  Private
  227. ; information follows the SDPPanelRecord, so the handle must not be re-sized.
  228.  
  229. (defrecord SDPPanelRecord 
  230.    (bounds :RECT)
  231.    (visible :BOOLEAN)
  232.    (enabled :BOOLEAN)
  233.    (focused :BOOLEAN)
  234. ; padByte: Byte;
  235.    (identity :SIGNED-LONG)
  236.    (refCon :SIGNED-LONG)
  237.    (listRect :RECT)
  238.    (popupRect :RECT)
  239.    (numberOfRows :SIGNED-INTEGER)
  240.    (rowHeight :SIGNED-INTEGER)
  241.    (pabMode :BOOLEAN)
  242.    )
  243.  
  244. (def-mactype :SDPPANELPTR (find-mactype :POINTER))
  245. (def-mactype :SDPPANELHANDLE (find-mactype :HANDLE))
  246.  
  247. (def-mactype :PANELBUSYPROC (find-mactype :POINTER))
  248. ;  PROCEDURE PanelBusyProc(Panel: SDPPanelHandle; busy: BOOLEAN); 
  249.  
  250. ;  Find Panel Structures 
  251.  
  252. (defconstant $kSDPItemIsSelectedBit 0)
  253. (defconstant $kSDPFindTextExistsBit 1)
  254. ;  Values of SDPFindPanelState 
  255. (defconstant $kSDPItemIsSelectedMask #X1); 1<<kSDPItemIsSelectedBit
  256. (defconstant $kSDPFindTextExistsMask #X2); 1<<kSDPFindTextExistsBit
  257.  
  258. (def-mactype :SDPFINDPANELSTATE (find-mactype :SIGNED-INTEGER))
  259.  
  260. ;  Values of SDPFindPanelFocus 
  261.  
  262. (defconstant $kSDPFindPanelNoFocus 0)
  263. (defconstant $kSDPFindPanelListHasFocus 1)
  264. (defconstant $kSDPFindPanelTextHasFocus 2)
  265.  
  266. (def-mactype :SDPFINDPANELFOCUS (find-mactype :SIGNED-INTEGER))
  267.  
  268. (defrecord SDPFindPanelRecord 
  269.    (upperLeft :POINT)
  270.    (visible :BOOLEAN)
  271.    (enabled :BOOLEAN)
  272.    (nowFinding :BOOLEAN)
  273. ; padByte: Byte;
  274.    (currentFocus :SIGNED-INTEGER)
  275.    (identity :SIGNED-LONG)
  276.    (simultaneousSearchCount :SIGNED-INTEGER)
  277.    (refCon :SIGNED-LONG)
  278.    )
  279.  
  280. (def-mactype :SDPFINDPANELPTR (find-mactype :POINTER))
  281. (def-mactype :SDPFINDPANELHANDLE (find-mactype :HANDLE))
  282.  
  283. ;  Values of SDPFindPanelResult 
  284. (defconstant $kSDPSelectedAFindItem 0)
  285. (defconstant $kSDPFindSelectionChanged 1)
  286. (defconstant $kSDPFindCompleted 2)
  287. (defconstant $kSDPTextStateChanged 3)
  288. (defconstant $kSDPFocusChanged 4)
  289. (defconstant $kSDPSelectionAndFocusChanged 5)
  290. (defconstant $kSDPMenuChanged 6)
  291. (defconstant $kSDPSelectionAndMenuChanged 7)
  292. (defconstant $kSDPProcessedFind 8)
  293.  
  294. (def-mactype :SDPFINDPANELRESULT (find-mactype :SIGNED-INTEGER))
  295.  
  296. (def-mactype :PACKEDRSTRINGLISTHANDLE (find-mactype :HANDLE))
  297.  
  298. (def-mactype :PACKEDDSSPECHANDLE (find-mactype :HANDLE))
  299.  
  300. (def-mactype :FINDPANELBUSYPROC (find-mactype :POINTER))
  301. ; PROCEDURE FindPanelBusyProc(findPanel: SDPFindPanelHandle; busy: BOOLEAN); 
  302.  
  303. ;  Prompt For Identity Routines 
  304.  
  305.  
  306. (deftrap _sdppromptforid ((id (:pointer :signed-long)) (guestprompt (:pointer (:string 255))) (specificidprompt (:pointer (:string 255))) (localidprompt (:pointer (:string 255))) (recordtype (:pointer :rstring)) (permittedkinds :signed-integer) (selectedkind (:pointer :signed-integer)) (loginfilter (:pointer :recordid)) (filterkind :signed-integer))
  307.    (:stack :signed-integer)
  308.    (:stack-trap #xAA5D :d0 (+ (ash 16 16) 904) id guestprompt specificidprompt localidprompt recordtype permittedkinds selectedkind loginfilter filterkind))
  309.  
  310. ; SDPNewPanel creates a new panel. You supply the window in which the panel
  311. ; is to live, the bounds for the panel (which includes both the menu and the list),
  312. ; whether or not the panel is to be initially visible, the initial RLI (nil for
  313. ; directories and volumes), the types of records that will be shown (only a single
  314. ; (non-nil) type which may contain wildcards), the identity by which to browse
  315. ; (for access control reasons), and a refCon which is  available to the caller.
  316.  
  317. (deftrap _sdpnewpanel ((newpanel (:pointer (:handle :sdppanelrecord))) (window (:pointer :grafport)) (bounds :rect) (visible :boolean) (enabled :boolean) (initialrli (:pointer :packedrli)) (typeslist (:handle :rstring)) (typecount :signed-long) (identity :signed-long) (enumflags :signed-long) (matchtypehow :signed-integer) (refcon :signed-long))
  318.    (:stack :signed-integer)
  319.    (:stack-trap #xAA5D :d0 (+ (ash 21 16) 100) newpanel window bounds visible enabled initialrli typeslist typecount identity enumflags matchtypehow refcon))
  320.  
  321. ; SDPSetIdentity Sets the identity used for browsing.
  322.  
  323. (deftrap _sdpsetidentity ((panel (:handle :sdppanelrecord)) (identity :signed-long))
  324.    (:stack :signed-integer)
  325.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 115) panel identity))
  326.  
  327. ; SDPGetNewPanel is similar to SDPNewPanel above, except it takes a resource id of a
  328. ; 'panl' resource.
  329.  
  330. (deftrap _sdpgetnewpanel ((newpanel (:pointer (:handle :sdppanelrecord))) (resourceid :signed-integer) (window (:pointer :grafport)) (initialrli (:pointer :packedrli)) (identity :signed-long))
  331.    (:stack :signed-integer)
  332.    (:stack-trap #xAA5D :d0 (+ (ash 9 16) 101) newpanel resourceid window initialrli identity))
  333.  
  334. ; Call this when you're completely done with a panel. It deallocates all of the
  335. ; associated data structures.
  336.  
  337. (deftrap _sdpdisposepanel ((panel (:handle :sdppanelrecord)))
  338.    (:stack :signed-integer)
  339.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 102) panel))
  340.  
  341. ; If the panel is visible, it makes it invisible by hiding the menu, turning off
  342. ; drawing of the list, and erasing and  invaling the list's rectangle.
  343.  
  344. (deftrap _sdphidepanel ((panel (:handle :sdppanelrecord)))
  345.    (:stack :signed-integer)
  346.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 103) panel))
  347.  
  348. ;  If the panel is invisible, it makes it visible and draws it. 
  349.  
  350.  
  351. (deftrap _sdpshowpanel ((panel (:handle :sdppanelrecord)))
  352.    (:stack :signed-integer)
  353.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 104) panel))
  354.  
  355. ;  Disables the list and menu so that it won't accept any commands. 
  356.  
  357.  
  358. (deftrap _sdpenablepanel ((panel (:handle :sdppanelrecord)) (enable :boolean))
  359.    (:stack :signed-integer)
  360.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 105) panel enable))
  361.  
  362. ; Move the upper-left-hand corner of the panel to (h, v), given in local coordinates of
  363. ; the panel's window.
  364.  
  365. (deftrap _sdpmovepanel ((panel (:handle :sdppanelrecord)) (h :signed-integer) (v :signed-integer))
  366.    (:stack :signed-integer)
  367.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 107) panel h v))
  368.  
  369. ; Resizes the panel to have the given width and height (keeping the upper-left-hand
  370. ; corner in a fixed position).
  371.  
  372. (deftrap _sdpsizepanel ((panel (:handle :sdppanelrecord)) (width :signed-integer) (height :signed-integer))
  373.    (:stack :signed-integer)
  374.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 108) panel width height))
  375.  
  376. ; This routine simulates a double-click on the selected item (if there is no selected
  377. ; item, then it does nothing), and it returns the result of that "double-click" via the
  378. ; whatHappened parameter. If a container is selected, then that container will be
  379. ; opened and kMovedDownTheHierarchy is returned. If, however, the user is at the lowest
  380. ; level in the hierarchy, then kSDPSelectedAnItem is returned.
  381.  
  382. (deftrap _sdpopenselecteditem ((panel (:handle :sdppanelrecord)) (whathappened (:pointer :signed-integer)))
  383.    (:stack :signed-integer)
  384.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 109) panel whathappened))
  385.  
  386. ; Returns whether a record is selected, something else is selected, or nothing is
  387. ; selected.
  388.  
  389. (deftrap _sdpgetpanelselectionstate ((panel (:handle :sdppanelrecord)) (itsstate (:pointer :signed-integer)))
  390.    (:stack :signed-integer)
  391.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 110) panel itsstate))
  392.  
  393. ; Returns the size of the currently-selected DSSpec, or zero if a record is
  394. ; not selected.  It is safe to do a NewPtr (SDPGetPanelSelectionSize (...))
  395.  
  396. (deftrap _sdpgetpanelselectionsize ((panel (:handle :sdppanelrecord)) (dsspecsize (:pointer :signed-integer)))
  397.    (:stack :signed-integer)
  398.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 114) panel dsspecsize))
  399.  
  400. ; Returns the currently-selected DSSpec, or a zero-lengthed
  401. ; DSSpec if a record is not selected. It is assumed that the selection
  402. ; buffer allocated is large enough.
  403.  
  404. (deftrap _sdpgetpanelselection ((panel (:handle :sdppanelrecord)) (selection (:pointer :packeddsspec)))
  405.    (:stack :signed-integer)
  406.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 111) panel selection))
  407.  
  408. ; Forces browsing to the specified RLI. If prli is the current RLI, then it does
  409. ; nothing.
  410.  
  411. (deftrap _sdpsetpath ((panel (:handle :sdppanelrecord)) (prli (:pointer :packedrli)))
  412.    (:stack :signed-integer)
  413.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 112) panel prli))
  414.  
  415. ; This is the main driver for the panel.  You should pass all events to SDPPanelEvent
  416. ; including NULL events.  If you have more than 1 panel, you will need to
  417. ; call SDPPanelEvent for each panel.  NOTE:  For Update Events you will also need to call
  418. ; SDPUpdatePanel as described below.
  419.  
  420. (deftrap _sdppanelevent ((panel (:handle :sdppanelrecord)) (theevent :eventrecord) (whathappened (:pointer :signed-integer)))
  421.    (:stack :signed-integer)
  422.    (:stack-trap #xAA5D :d0 (+ (ash 6 16) 113) panel theevent whathappened))
  423.  
  424. ; SDPUpdatePanel should be called in response to an update event.  Generally you will
  425. ; have first called BeginUpdate, and pass the windows visRgn as theRgn.  If NULL
  426. ; is passed for theRgn the entire panel is re-drawn.  NOTE:  Drawing is not cliped to
  427. ; theRgn, if this is desired, you must first call SetClip.
  428.  
  429. (deftrap _sdpupdatepanel ((panel (:handle :sdppanelrecord)) (thergn (:handle :region)))
  430.    (:stack :signed-integer)
  431.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 106) panel thergn))
  432.  
  433. ; SDPSelectString scrolls and selects the closest matching string at the current
  434. ; level.  This is the same behavior as if the user typed in the given string.
  435.  
  436. (deftrap _sdpselectstring ((panel (:handle :sdppanelrecord)) (name (:pointer :rstring)))
  437.    (:stack :signed-integer)
  438.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 116) panel name))
  439.  
  440. ; SDPGetPathLength returns the length in bytes required to hold the current path name
  441. ; in RLI format.  This corresponds to the path name in the popup menu.
  442.  
  443. (deftrap _sdpgetpathlength ((panel (:handle :sdppanelrecord)) (pathnamelength (:pointer :signed-integer)))
  444.    (:stack :signed-integer)
  445.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 117) panel pathnamelength))
  446.  
  447. ;  SDPGetPath returns the current rli. 
  448.  
  449. (deftrap _sdpgetpath ((panel (:handle :sdppanelrecord)) (prli (:pointer :packedrli)) (dsrefnum (:pointer :signed-integer)))
  450.    (:stack :signed-integer)
  451.    (:stack-trap #xAA5D :d0 (+ (ash 6 16) 118) panel prli dsrefnum))
  452.  
  453. ; SDPSetFocus will draw the focus rectangle or erase the focus rectangle depending upon
  454. ; the focus boolean.
  455.  
  456. (deftrap _sdpsetfocus ((panel (:handle :sdppanelrecord)) (focus :boolean))
  457.    (:stack :signed-integer)
  458.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 119) panel focus))
  459.  
  460. ; SDPSetPanelBalloonHelp allows clients to specify a STR# resource id to use for
  461. ; balloon help.  Balloon help is unavailable until this call is made.
  462.  
  463. (deftrap _sdpsetpanelballoonhelp ((panel (:handle :sdppanelrecord)) (balloonhelpid :signed-integer))
  464.    (:stack :signed-integer)
  465.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 120) panel balloonhelpid))
  466.  
  467. ; SDPInstallPanelBusyProc allows clients to install a CB that will be called while
  468. ; the panel is aynchronously busy.
  469.  
  470. (deftrap _sdpinstallpanelbusyproc ((panel (:handle :sdppanelrecord)) (busyproc :pointer))
  471.    (:stack :signed-integer)
  472.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 121) panel busyproc))
  473.  
  474.  
  475. (deftrap _sdpnewfindpanel ((newpanel (:pointer (:handle :sdpfindpanelrecord))) (window (:pointer :grafport)) (upperleft :point) (layoutresourceid :signed-integer) (visible :boolean) (enabled :boolean) (typeslist (:handle :rstring)) (typecount :signed-long) (matchtypehow :signed-integer) (identity :signed-long) (simultaneoussearchcount :signed-integer) (initialfocus :signed-integer) (refcon :signed-long))
  476.    (:stack :signed-integer)
  477.    (:stack-trap #xAA5D :d0 (+ (ash 20 16) 2300) newpanel window upperleft layoutresourceid visible enabled typeslist typecount matchtypehow identity simultaneoussearchcount initialfocus refcon))
  478.  
  479.  
  480. (deftrap _sdpdisposefindpanel ((findpanel (:handle :sdpfindpanelrecord)))
  481.    (:stack :signed-integer)
  482.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 2301) findpanel))
  483.  
  484.  
  485. (deftrap _sdpstartfind ((findpanel (:handle :sdpfindpanelrecord)))
  486.    (:stack :signed-integer)
  487.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 2302) findpanel))
  488.  
  489.  
  490. (deftrap _sdpstopfind ((findpanel (:handle :sdpfindpanelrecord)))
  491.    (:stack :signed-integer)
  492.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 2303) findpanel))
  493.  
  494.  
  495. (deftrap _sdpfindpanelevent ((findpanel (:handle :sdpfindpanelrecord)) (event :eventrecord) (whathappened (:pointer :signed-integer)))
  496.    (:stack :signed-integer)
  497.    (:stack-trap #xAA5D :d0 (+ (ash 6 16) 2304) findpanel event whathappened))
  498.  
  499.  
  500. (deftrap _sdpupdatefindpanel ((findpanel (:handle :sdpfindpanelrecord)) (thergn (:handle :region)))
  501.    (:stack :signed-integer)
  502.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 2305) findpanel thergn))
  503.  
  504.  
  505. (deftrap _sdpshowfindpanel ((findpanel (:handle :sdpfindpanelrecord)))
  506.    (:stack :signed-integer)
  507.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 2306) findpanel))
  508.  
  509.  
  510. (deftrap _sdphidefindpanel ((findpanel (:handle :sdpfindpanelrecord)))
  511.    (:stack :signed-integer)
  512.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 2307) findpanel))
  513.  
  514.  
  515. (deftrap _sdpmovefindpanel ((findpanel (:handle :sdpfindpanelrecord)) (h :signed-integer) (v :signed-integer))
  516.    (:stack :signed-integer)
  517.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 2308) findpanel h v))
  518.  
  519.  
  520. (deftrap _sdpenablefindpanel ((findpanel (:handle :sdpfindpanelrecord)) (enabled :boolean))
  521.    (:stack :signed-integer)
  522.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 2309) findpanel enabled))
  523.  
  524.  
  525. (deftrap _sdpsetfindpanelfocus ((findpanel (:handle :sdpfindpanelrecord)) (newfocus :signed-integer))
  526.    (:stack :signed-integer)
  527.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 2310) findpanel newfocus))
  528.  
  529.  
  530. (deftrap _sdpgetfindpanelstate ((findpanel (:handle :sdpfindpanelrecord)) (itsstate (:pointer :signed-integer)))
  531.    (:stack :signed-integer)
  532.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 2311) findpanel itsstate))
  533.  
  534.  
  535. (deftrap _sdpgetfindpanelselectionsize ((findpanel (:handle :sdpfindpanelrecord)) (size (:pointer :signed-integer)))
  536.    (:stack :signed-integer)
  537.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 2312) findpanel size))
  538.  
  539.  
  540. (deftrap _sdpgetfindpanelselection ((findpanel (:handle :sdpfindpanelrecord)) (selection (:pointer :packeddsspec)))
  541.    (:stack :signed-integer)
  542.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 2313) findpanel selection))
  543.  
  544.  
  545. (deftrap _sdpsetfindpanelballoonhelp ((findpanel (:handle :sdpfindpanelrecord)) (balloonhelpid :signed-integer))
  546.    (:stack :signed-integer)
  547.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 2314) findpanel balloonhelpid))
  548.  
  549.  
  550. (deftrap _sdpsetfindidentity ((findpanel (:handle :sdpfindpanelrecord)) (identity :signed-long))
  551.    (:stack :signed-integer)
  552.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 2315) findpanel identity))
  553.  
  554.  
  555. (deftrap _sdpinstallfindpanelbusyproc ((findpanel (:handle :sdpfindpanelrecord)) (busyproc :pointer))
  556.    (:stack :signed-integer)
  557.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 2316) findpanel busyproc))
  558.  
  559.  
  560. (deftrap _sdpgeticonbytype ((recordtype (:pointer :rstring)) (whichicons :signed-long) (iconsuite (:pointer :handle)))
  561.    (:stack :signed-integer)
  562.    (:stack-trap #xAA5C :d0 1024 recordtype whichicons iconsuite))
  563.  
  564.  
  565. (deftrap _sdpgetdsspecicon ((packeddsspec (:pointer :packeddsspec)) (whichicons :signed-long) (iconsuite (:pointer :handle)))
  566.    (:stack :signed-integer)
  567.    (:stack-trap #xAA5C :d0 1025 packeddsspec whichicons iconsuite))
  568.  
  569.  
  570. (deftrap _sdpgetcategories ((catagories (:pointer (:handle :packedpathname))) (displaynames (:pointer (:handle :packedpathname))))
  571.    (:stack :signed-integer)
  572.    (:stack-trap #xAA5C :d0 1026 catagories displaynames))
  573.  
  574.  
  575. (deftrap _sdpgetcategorytypes ((category (:pointer :rstring)) (types (:pointer (:handle :packedpathname))))
  576.    (:stack :signed-integer)
  577.    (:stack-trap #xAA5C :d0 1027 category types))
  578.  
  579.  
  580. (deftrap _sdpresolvealiasfile ((filespec :fsspecptr) (resolveddsspec (:handle :packeddsspec)) (identity :signed-long) (maypromptuser :boolean))
  581.    (:stack :signed-integer)
  582.    (:stack-trap #xAA5D :d0 (+ (ash 7 16) 3700) filespec resolveddsspec identity maypromptuser))
  583.  
  584.  
  585. (deftrap _sdpresolvealiasdsspec ((thealiasdsspec (:handle :packeddsspec)) (identity :signed-long) (maypromptuser :boolean))
  586.    (:stack :signed-integer)
  587.    (:stack-trap #xAA5D :d0 (+ (ash 5 16) 3701) thealiasdsspec identity maypromptuser))
  588.  
  589.  
  590. (deftrap _sdprepairpersonaldirectory ((pd :fsspecptr) (showprogress :boolean))
  591.    (:stack :signed-integer)
  592.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 6700) pd showprogress))
  593.  
  594. ; $ENDC                         ;  UsingOCEStandardDirectory 
  595.  
  596. ; $IFC NOT UsingIncludes
  597.  
  598. ; $ENDC
  599.  
  600. (export '($KSDPPROCESSEDFIND $KSDPSELECTIONANDMENUCHANGED $KSDPMENUCHANGED
  601.           $KSDPSELECTIONANDFOCUSCHANGED $KSDPFOCUSCHANGED $KSDPTEXTSTATECHANGED
  602.           $KSDPFINDCOMPLETED $KSDPFINDSELECTIONCHANGED $KSDPSELECTEDAFINDITEM
  603.           $KSDPFINDPANELTEXTHASFOCUS $KSDPFINDPANELLISTHASFOCUS
  604.           $KSDPFINDPANELNOFOCUS $KSDPFINDTEXTEXISTSMASK $KSDPITEMISSELECTEDMASK
  605.           $KSDPFINDTEXTEXISTSBIT $KSDPITEMISSELECTEDBIT $KSDPCHANGEDSELECTION
  606.           $KSDPSELECTEDANITEM $KSDPPROCESSED $KSDPCONTAINERALIASSELECTED
  607.           $KSDPRECORDALIASSELECTED $KSDPRECORDSELECTED $KSDPCONTAINERSELECTED
  608.           $KSDPLOCKEDCONTAINERSELECTED $KSDPNOTHINGSELECTED
  609.           $KSDPRESTRICTTORECORD $KSDPRESTRICTTODIRECTORY $KSDPSUGGESTIONONLY
  610.           $KSDPLOCALIDENTITYMASK $KSDPSPECIFICIDENTITYMASK $KSDPGUESTMASK
  611.           $KSDPLOCALIDENTITYBIT $KSDPSPECIFICIDENTITYBIT $KSDPGUESTBIT
  612.           $KSDPCONTAINING $KSDPENDINGWITH $KSDPBEGINSWITH $KSDPEXACTMATCH
  613.           $KSDPMATCHALL $KSTANDARDFINDLAYOUT $KSDPFINDPANELRESOURCETYPE
  614.           $KSDPPANELRESOURCETYPE $KLASTSPINNERICON $KFIRSTSPINNERICON
  615.           $PREFERREDPERSONALDIRECTORYICONRESOURCE $DIRECTORIESICONRESOURCE
  616.           $PERSONALDIRECTORYICONRESOURCE $LOCKEDDIRECTORYFOLDERICONRESOURCE
  617.           $DIRECTORYFOLDERICONRESOURCE $GENERICTEMPLATEICONRESOURCE
  618.           $GENERICATTRIBUTEICONRESOURCE $GENERICRECORDICONRESOURCE
  619.           $GENERICLOCKEDDIRECTORYICONRESOURCE $GENERICDIRECTORYICONRESOURCE
  620.           $SVALLAVAILABLEDATA $SVALL8BITDATA $SVALL4BITDATA $SVALL1BITDATA
  621.           $SVALLMINIDATA $SVALLSMALLDATA $SVALLLARGEDATA $SVMINI8BIT
  622.           $SVMINI4BIT $SVMINI1BIT $SVSMALL8BIT $SVSMALL4BIT $SVSMALL1BIT
  623.           $SVLARGE8BIT $SVLARGE4BIT $SVLARGE1BIT $GESTALTSDPPROMPTVERSION
  624.           $GESTALTSDPFINDVERSION $GESTALTSDPSTANDARDDIRECTORYVERSION
  625.           $KSDPREPAIRPERSONALDIRECTORY $KSDPRESOLVEALIASDSSPEC
  626.           $KSDPRESOLVEALIASFILE $KSDPGETCATEGORYTYPES $KSDPGETCATEGORIES
  627.           $KSDPGETDSSPECICON $KSDPGETICONBYTYPE $KSDPINSTALLFINDPANELBUSYPROC
  628.           $KSDPSETFINDIDENTITY $KSDPSETFINDPANELBALLOONHELP
  629.           $KSDPGETFINDPANELSELECTION $KSDPGETFINDPANELSELECTIONSIZE
  630.           $KSDPGETFINDPANELSTATE $KSDPSETFINDPANELFOCUS $KSDPENABLEFINDPANEL
  631.           $KSDPMOVEFINDPANEL $KSDPHIDEFINDPANEL $KSDPSHOWFINDPANEL
  632.           $KSDPDRAWFINDPANEL $KSDPFINDPANELEVENT $KSDPSTOPFIND $KSDPSTARTFIND
  633.           $KSDPDISPOSEFINDPANEL $KSDPNEWFINDPANEL $KSDPPROMPTFORID
  634.           $KSDPINSTALLPANELBUSYPROC $KSDPSETPANELBALLOONHELP $KSDPSETFOCUS
  635.           $KSDPGETPATH $KSDPGETPATHLENGTH $KSDPSELECTSTRING $KSDPSETIDENTITY
  636.           $KSDPGETPANELSELECTIONSIZE $KSDPPANELEVENT $KSDPSETPATH
  637.           $KSDPGETPANELSELECTION $KSDPGETPANELSELECTIONSTATE
  638.           $KSDPOPENSELECTEDITEM $KSDPSIZEPANEL $KSDPMOVEPANEL $KSDPUPDATEPANEL
  639.           $KSDPENABLEPANEL $KSDPSHOWPANEL $KSDPHIDEPANEL $KSDPDISPOSEPANEL
  640.           $KSDPGETNEWPANEL $KSDPNEWPANEL))
  641. (provide-interface 'OCEStandardDirectory)